/*
 * Copyright (c) 2013 WDCY Information Technology Co. Ltd
 * www.wdcy.cc
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * WDCY Information Technology Co. Ltd ("Confidential Information").
 * You shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement you
 * entered into with WDCY Information Technology Co. Ltd.
 */
package com.monkey.web.platform.service;


import com.monkey.core.domain.resource.Menu;
import com.monkey.core.plugin.dto.MonkeyDto;
import com.monkey.core.plugin.service.BaseTreeableService;

/**
 * @author Wu Tianqiang
 */
public interface MenuService extends BaseTreeableService<Menu, Long> {
    /**
     * 添加资源
     *
     * @param monkeyDto
     * @return
     */
    void addMenu(MonkeyDto monkeyDto);

    void modifyMenu(MonkeyDto monkeyDto);

    /**
     * 删除资源
     *
     * @param menuId
     * @return
     */
    void removeMenu(Long[] menuId);

    /**
     * 得到真实的资源标识  即 父亲:儿子
     *
     * @param menu
     * @return
     */
    public String findActualMenuIdentity(Menu menu);

    public boolean hasPermission(String permission, String actualResourceIdentity);
}